<template>
  <el-row>
    <el-row>
      <el-transfer v-model="selectedData" :data="optionData" :props="props" :titles="titles"></el-transfer>
    </el-row>
    <el-row justify="center" type="flex">
      <el-button>取 消</el-button>
      <el-button type="primary">保存</el-button>
    </el-row>
  </el-row>
</template>

<script>
import *  as dossierFieldTmplApi from '../apis/fieldTmpl'

export default {
  name: "dossierFieldTmplTransfer",
  /*model: {
    prop: 'selectedData',
  },
  props: {
    selectedData:{type:Array,default:[]}
  },*/
  data() {
    return {
      optionData: [],
      selectedData: [],
      titles: ['可选字段', '已选字段'],
      props: {key: 'id', label: 'fieldLabel', disabled: 'disabled'},
      rightDefaultChecked:[]
    }
  },
  computed: {},
  mounted() {
    this.loadBaseData()
  },
  methods: {
    loadBaseData() {
      const params = Object.assign({category_id: 'null'})
      dossierFieldTmplApi.list().then(response => {
        let {result} = response
        this.optionData = result || []
        /* debugger
         this.responseHandle(response, "刷新数据").then((result) => {
           debugger
           this.optionData= result||[]
         })*/
      }).catch((e) => {
        console.error(e)
      })
    }

  }
}
</script>

<style scoped>

</style>